#include<stdio.h>
int main()
{
    int num[4][14] = {0};
    //freopen("in.txt","r",stdin);
    int n;
    scanf("%d",&n);
    for(int i = 1; i <= n; i++)
    {
        char x;
        int a;
        scanf("\n%c %d",&x,&a);
        if(x == 'S')    
        {
            num[0][a] = 1;
            //printf("%d\n",a);
        }
        if(x == 'H')
        {
            num[1][a] = 1;
        }
        if(x == 'C')    num[2][a] = 1;
        if(x == 'D')    num[3][a] = 1;
    }
    for(int i = 1; i <= 13; i++)
    {
       if(num[0][i] == 0) printf("S %d\n",i);
    }

    for(int i = 1; i <= 13; i++)
    {
        if(num[1][i] == 0) printf("H %d\n",i);
    }

    for(int i = 1; i <= 13; i++)
    {
        if(num[2][i] == 0) printf("C %d\n",i);
    }

    for(int i = 1; i <= 13; i++)
    {
        if(num[3][i] == 0) printf("D %d\n",i);
    }
}